package JavaSe;

import java.util.Date;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}23:47
 */
public class Clone implements Cloneable{
    private Date birth = new Date();

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public void changeDate(){
        this.birth.setMonth(4);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Clone o = null;
        o = (Clone) super.clone();
        o.birth = (Date) this.getBirth().clone();
        return o;
    }
}
